package com.wwl.cms.utils.designModeTest.iterator;

import org.apache.poi.xdgf.usermodel.section.CombinedIterable;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/9 19:12
 * @description:
 */
public class ComputerCollege implements College {
    Department[] departments;
    int numOfDepartment =0;

    public ComputerCollege(){
        departments = new Department[5];
        addDepartment("java专业","java专业");
        addDepartment("PHP专业","PHP专业");
        addDepartment("大数据专业","大数据专业");
    }

    @Override
    public String getName() {
        return "计算机学院";
    }

    @Override
    public void addDepartment(String name, String desc) {
        Department department = new Department(name,desc);
        departments[numOfDepartment] = department;
        numOfDepartment+=1;

    }

    @Override
    public Iterable createIterable() {
        //return new ComputerCollegeIterator(departments);
        return null;
    }
}
